//
//  RootViewController.m
//  11_13_tableView
//
//  Created by lanou on 15/11/23.
//  Copyright © 2015年 changfengZhang. All rights reserved.
//

#import "RootViewController.h"
#import "Header.h"

@interface RootViewController ()

@end

@implementation RootViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    FirstViewController *firstVC = [[FirstViewController alloc] init];
    UINavigationController *firstNC = [[UINavigationController alloc] initWithRootViewController:firstVC];
    firstNC.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"第一页" image:[UIImage imageNamed:@"activity.png"] tag:100];
    
    SecondViewController *secondVC = [[SecondViewController alloc] init];
    UINavigationController *secondNC = [[UINavigationController alloc] initWithRootViewController:secondVC];
    secondNC.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"第二页" image:[UIImage imageNamed:@"activity.png"] tag:101];
    
    ThirdViewController *thirdVC = [[ThirdViewController alloc] init];
    UINavigationController *thirdNC = [[UINavigationController alloc] initWithRootViewController:thirdVC];
    thirdNC.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"第三页  " image:[UIImage imageNamed:@"activity.png"] tag:102];
    
    self.viewControllers = @[firstNC, secondNC, thirdNC];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
